﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
  public partial  class State
    {
         #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public State(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public List<State> GetAllState()
        {
          
            return _dataObject.GetAllState();
        }
        public void Create()
        {
            _dataObject.CreateState(this);
        }
        public void Delete()
        {
            _dataObject.DeleteState(this);
        }
        public void GetStateById()
        {
            _dataObject.GetStateById(this);
        }
        public void Update()
        {
            _dataObject.UpdateState(this);
        }
        public void GetStateByName()
        {
             _dataObject.GetStateByName(this);
        }
        public List<State> GetStateByCountryId()
        {
            string decode = EncryptionDecryption.Encrypt("123");
          return   _dataObject.GetStateByCountryId(this);
        }
    }
}
